using System;
using System.Collections.Generic;
using Castle.ActiveRecord;

namespace Saffron.Framework.Users
{
    [ActiveRecord]
    public class SystemRole : ActiveRecordBase
    {
        private int _id;
        private string _name;

        [PrimaryKey]
        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        [Property(NotNull = true, Unique = true)]
        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public static SystemRole FindByPrimaryKey(int id)
        {
            return (SystemRole)FindByPrimaryKey(typeof(SystemRole), id, true);
        }
        
    }

    public enum SystemRoleType
    {
        Guest = 1,
        User = 2,
        Admin = 3
    }
}
